<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
		<title>Placeholder input</title>

		<style type="text/css">
			@import "../../../../dijit/themes/tundra/tundra.css";
			@import "../../../../dojo/resources/dojo.css";
		</style>

	<script type="text/javascript" src="../../../../dojo/dojo.js"
			data-dojo-config="async: false, has: { 'dojo-bidi': true }"></script>
	<script type="text/javascript">
		require([
			"doh/runner",
			"dojo/dom",
			"dojo/query",
			"dojo/parser",
			"dijit/registry",
			"dijit/form/TextBox",
			"dojo/domReady!"
		], function(doh, dom, query, parser, registry){

				doh.register("parse", function(){
					return parser.parse();
				});

				doh.register("Input tests", [
					{
						name: "Bidi",
						runTest: function(){
							var spanPlaceHolder = query("span.dijitPlaceHolder")[0];
							doh.is("rtl", spanPlaceHolder.dir, "placeholder span 'dir' attribute should be set to 'rtl'");
						}
					}
				]);

				doh.register("log", function(){
					dom.byId('failures').innerHTML = doh._failureCount;
					dom.byId('errors').innerHTML = doh._errorCount;
				});

				doh.run();
		});
	</script>
	</head>
	<body>
		<br><br>
		<label >TextBox with Placeholder, textDir="auto"</label>
		<input id="inputPlaceholder" data-dojo-type="dijit/form/TextBox" placeHolder="&#1513;placeholder!" data-dojo-props='textDir:"auto"' name="placeHolder" value=""/>

		<br>Errors:&nbsp;<span id="errors">?</span>
		<br>Failures:&nbsp;<span id="failures">?</span>
	</body>
</html>
